/* Include/CUnknowd.h Written by, Sohail Qayum Malik<sohail@stupidcomputing.com> */

#include <windows.h>

#ifndef __CUnknown_HEADER__
#define __CUnknown_HEADER__

#ifdef BUILDING_DLL
#define	__CUnknown_Header_DLL_EXPORT_IMPORT__ __declspec (dllexport)
#else
#define	__CUnknown_Header_DLL_EXPORT_IMPORT__ __declspec (dllimport)
#endif

/* IUnknown, Every OLE and COM object, without exception, exposes this interface as such that the pointers...
             to the functions of this interface occupy very first few entries of the vtable */			 
class __CUnknown_Header_DLL_EXPORT_IMPORT__ CUnknown : public IUnknown {

  public:
  
     CUnknown();
     virtual ~CUnknown(void);
	
     STDMETHODIMP QueryInterface(REFIID, void**);
	 STDMETHODIMP_(ULONG) AddRef();
 	 STDMETHODIMP_(ULONG) Release();
	
  private:
  
     ULONG 						m_RefCount;
};

__CUnknown_Header_DLL_EXPORT_IMPORT__ CUnknown *getCUnknown(void);


#endif /* __CUnknown_HEADER__ */